
Replicatin File for "Do Citizens Vote Against Incumbents Who Permit Local Immigration? Evidence from the Mariel Boatlift"

Below, I describe how to replicate all of the tables and figures in the paper.

Table 1
-Run code/tab1.do
	-Relies on data/county_analysis_data.dta
	-Produces output/fixed_effects_table.tex (Table 1)

Figure 1
-Run code/synth555.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/synth_output555.dta
-Run code/synth_figs_tabs.do (lines 18-29)
	-Relies on modified_data/synth_output555.dta
	-Produces output/original_synth_555.pdf (Figure 1)

Figure 2
-Run code/synth555.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/synth_output555.dta
-Run code/synth_figs_tabs.do (lines 36-76)
	-Relies on modified_data/synth_output555.dta
	-Produces output/original_diff_synth_555.pdf (Figure 2)

Table 2
-Run code/precinct_analyses.do (lines 17-84)
	-Relies on data/neighborhood_analysis.dta
	-Produces output/miami_precincts.tex (Table 2)

Figure 3
-Run code/precinct_analyses.do (lines 89-116)
	-Relies on data/neighborhood_analysis.dta and data/hisp_precinct_analysis.dta
	-Produces output/cuban_neighborhoods.pdf (Figure 3, left panel) and output/hisp_precincts.pdf (Figure 3, right panel)

Table 3
-Run code/precinct_analyses.do (lines 121-255)
	-Relies on data/neighborhood_analysis.dta, data/hudson_city_analysis.dta, and data/hudson_ward_analysis.dta
	-Produces output/miami_vs_hudson.tex (Table 3)

Table 4
-Run code/precinct_analyses.do (lines 260-323)
	-Relies on data/house_neighborhood_analysis.dta
	-Produces output/miami_house.tex (Table 4)

Table A1
-Run code/tabA1.do
	-Relies on data/surveys/a1155g.dat and data/surveys/1135.dat
	-Produces output/refugee_attitudes_table.tex (Table A1)

Table A2
-Run code/synth250.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/synth_output250.dta
-Run code/synth555.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/synth_output555.dta
-Run code/synth_florida.do
	-Relies on data/florida_county_analysis_data.dta
	-Produces modified_data/synth_output_florida.dta
-Run code/synth_figs_tabs.do (lines 83-161)
	-Relies on modified_data/synth_output250.dta, modified_data/synth_output555.dta, and modified_data/synth_output_florida.dta
	-Produces output/synth_by_yr_table.tex (Table A2)

Table A3
-Run code/matrix_completion_estimates.R
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/matrix_completion_output.csv
-Run code/matrix_completion_figs_tabs.do
	-Relies on modified_data/matrix_completion_output.csv
	-Produces output/mc_by_yr_table.tex (Table A3)

Figure A1
-Run code/matrix_completion_estimates.R
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/matrix_completion_output.csv
-Run code/matrix_completion_figs_tabs.do
	-Relies on modified_data/matrix_completion_output.csv
	-Produces output/matrix_completion555.pdf (Figure A1)

Figure A2
-Run code/figA2.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/fixed_effects_sensitivity.dta and output/fe_sensitivity.pdf (Figure A2)

Figure A3
-Run code/figA3.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/synth_sensitivity.dta and output/synth_sensitivity.pdf (Figure A3)

Figure A4
-Run code/figA4.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/prediction_fe.dta and output/prediction_fe.pdf (Figure A4)

Figure A5
-Run code/figA5.do
	-Relies on data/county_analysis_data.dta
	-Produces modified_data/prediction_synth.dta and output/prediction_synth.pdf (Figure A5)

Figure A6
-Run code/figA6.do
	-Relies on data/county_analysis_data.dta
	-Produces output/trend_comparison.pdf (Figure A6)

Figure A7
-Run code/precinct_analyses.do (lines 329-342)
	-Relies on data/neighborhood_analysis.dta and data/hudson_city_analysis.dta
	-Produces output/miami_vs_hudson.pdf (Figure A7)

Table A4
-Run code/precinct_analyses.do (lines 348-404)
	-Relies on data/pres_house_analysis.dta
	-Produces output/house_v_pres.tex (Table A4)
